package iammry.com.activity;

import android.graphics.drawable.AnimationDrawable;
import android.widget.ImageView;
import android.widget.TextView;

import com.lidroid.xutils.view.annotation.ViewInject;

import iammry.com.R;
import iammry.com.base.BaseActivity;

public class ShookActivity extends BaseActivity {

    @ViewInject(R.id.shook_iv_loadanimal)
    ImageView shookIvLoadanimal;

    @ViewInject(R.id.tv_tittle)
    TextView tv_tittle;

    @Override
    protected void initView() {
        setLayout(this, R.layout.shookactivity_layout);
        tv_tittle.setText("摇一摇");



    }

    @Override
    protected void initData() {
        shookIvLoadanimal.setBackgroundResource(R.drawable.shook_animal);
        startAnima();
        startActivity(MainActivity.class);

    }

    /**
     * start animal
     */
    public void startAnima() {

        AnimationDrawable AniDraw = (AnimationDrawable) shookIvLoadanimal.getBackground();
        AniDraw.start();
    }


}
